using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableViewRunningAccount
	{
		public const string Table = "View_RunningAccount";
		public const string RunningAccountID = "RunningAccountID";
		public const string MemberAccountID = "MemberAccountID";
		public const string TypeID = "TypeID";
		public const string Amount = "Amount";
		public const string Description = "Description";
		public const string Remarks = "Remarks";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
		public const string LoginName = "LoginName";
	}
	
	[Serializable]
	public class BaseViewRunningAccount
		: IDbSessionEntity, IJsonClass
	{
		int m_RunningAccountID;
		/// <summary>
        /// 
        /// </summary>
        public int RunningAccountID
        {
            get { return m_RunningAccountID; }
            set { m_RunningAccountID = value; }
        }
		
		int? m_MemberAccountID;
		/// <summary>
        /// 
        /// </summary>
        public int? MemberAccountID
        {
            get { return m_MemberAccountID; }
            set { m_MemberAccountID = value; }
        }
		
		int m_TypeID;
		/// <summary>
        /// 
        /// </summary>
        public int TypeID
        {
            get { return m_TypeID; }
            set { m_TypeID = value; }
        }
		
		double m_Amount;
		/// <summary>
        /// 
        /// </summary>
        public double Amount
        {
            get { return m_Amount; }
            set { m_Amount = value; }
        }
		
		string m_Description;
		/// <summary>
        /// 
        /// </summary>
        public string Description
        {
            get { return m_Description; }
            set { m_Description = value; }
        }
		
		string m_Remarks;
		/// <summary>
        /// 
        /// </summary>
        public string Remarks
        {
            get { return m_Remarks; }
            set { m_Remarks = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		string m_LoginName;
		/// <summary>
        /// 
        /// </summary>
        public string LoginName
        {
            get { return m_LoginName; }
            set { m_LoginName = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_RunningAccountID = reader[TableViewRunningAccount.RunningAccountID];
            m_MemberAccountID = reader[TableViewRunningAccount.MemberAccountID];
            m_TypeID = reader[TableViewRunningAccount.TypeID];
            m_Amount = reader[TableViewRunningAccount.Amount];
            m_Description = reader[TableViewRunningAccount.Description];
            m_Remarks = reader[TableViewRunningAccount.Remarks];
            m_Creater = reader[TableViewRunningAccount.Creater];
            m_CreatedBy = reader[TableViewRunningAccount.CreatedBy];
            m_Created = reader[TableViewRunningAccount.Created];
            m_Modified = reader[TableViewRunningAccount.Modified];
            m_ModifiedBy = reader[TableViewRunningAccount.ModifiedBy];
            m_ModifiedByID = reader[TableViewRunningAccount.ModifiedByID];
            m_LoginName = reader[TableViewRunningAccount.LoginName];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewRunningAccount.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_RunningAccountID = hashToRead["RunningAccountID"];
			 
             m_MemberAccountID = hashToRead["MemberAccountID"];
			 
             m_TypeID = hashToRead["TypeID"];
			 
             m_Amount = hashToRead["Amount"];
			 
             m_Description = hashToRead["Description"];
			 
             m_Remarks = hashToRead["Remarks"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
             m_LoginName = hashToRead["LoginName"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["RunningAccountID"] = RunningAccountID;
			
            hashToFill["MemberAccountID"] = MemberAccountID;
			
            hashToFill["TypeID"] = TypeID;
			
            hashToFill["Amount"] = Amount;
			
            hashToFill["Description"] = Description;
			
            hashToFill["Remarks"] = Remarks;
			
            hashToFill["Creater"] = Creater;
			
            hashToFill["CreatedBy"] = CreatedBy;
			
            hashToFill["Created"] = Created;
			
            hashToFill["Modified"] = Modified;
			
            hashToFill["ModifiedBy"] = ModifiedBy;
			
            hashToFill["ModifiedByID"] = ModifiedByID;
			
            hashToFill["LoginName"] = LoginName;
			
        }

        #endregion
		
	}
}
